<template>
	<view style="top: -400rpx">
		<view style="background-color: #FFFFFF; width:700rpx height: 70rpx; ">
			<image src="/static/宣传页面/search.png"
				style="width: 36rpx; height: 36rpx; margin-top: 20rpx; margin-left: 20rpx;">

			</image>
			<!-- <view style="background-color: #FFFFFF; width: 650rpx; height: 60rpx;margin-top: -50rpx;margin-left: 20rpx;"></view> -->
			<input type="text" placeholder="搜索..."
				style="background-color: #FFFFFF; width: 650rpx; height: 60rpx;margin-top: -58rpx;margin-left: 70rpx;  font-size: 25rpx; " />
		</view>
		<view>
			<view style="background-color: #FFFFFF; width:800rpx; height: 76rpx; border: 3rpx solid #B9B9B9;">

				<!-- <view style="background-color: #FFFFFF; width: 650rpx; height: 60rpx;margin-top: -50rpx;margin-left: 20rpx;"></view> -->
				<view style=" margin-top: 15rpx; margin-left: 20rpx; font-size: 30rpx;">最新资讯</view>

				<!-- <input type="text" value="分类>" style=" margin-top: 15rpx; margin-left: 420rpx; font-size: 30rpx;"/> -->
			</view>
			<view>
				<u-swiper :list="listPic" @change="change" @click="click" style="height: auto;"></u-swiper>

				<view v-for="(item,index) in list" style="margin-left: 40rpx; margin-top: 90rpx; margin-right: 30rpx;">
					<p style="font-size: 33rpx;">
						<font color="#616161" @click="goToDetail(item.id)"><b>{{item.title}}</b></font>
					</p>
					<p style="font-size: 16rpx;">
						<font color="#BBBBBB" @click="goToDetail(item.id)"><b>{{item.createTime}}</b></font>
					</p>
					<view
						style="background-color: #EEEEEE; height: 40rpx; margin-top:90rpx; margin-left: -90rpx; width: 800rpx;">
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "appa",
		data() {
			return {
				listPic: [
					"/static/宣传页面/changePic.png",
					"/static/宣传页面/changePic.png",
					"/static/宣传页面/changePic.png",
				],
				list: []
			};
		},
		onLoad() {
			this.axios({
				method: "get",
				url: "http://192.168.1.205:8080/front/propaganda/list",
			}).then((res) => {
				console.log(res.data)
				if (res.status === 200) {
					this.list = res.data.data
				}
			})
		},
		methods: {
			goToDetail(propagandaId) {
				uni.navigateTo({
					url: '/pages/news/diffDetailPage' + '?id=' +propagandaId 
				})
			},
			doToDiff() {
				uni.navigateTo({
					url: '/pages/news/diffPage'
				})
			}
		}

	}
</script>

<style scoped>
	button::after {
		border: none;
	}

	button {
		background-color: rgba(0, 0, 0, 0);
	}
</style>
